package org.eclipse.php.internal.console.ui.perspective;

import org.eclipse.php.internal.console.ui.view.HistoryView;
import org.eclipse.php.internal.console.ui.view.PHPConsoleVariablesView;
import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

public class PHPConsolePerspectiveFactory implements IPerspectiveFactory {

	public static final String PHPConsole_PERSPECTIVE = "org.eclipse.php.console.perspective";
	
	public void createInitialLayout(IPageLayout layout) {
        // Editors are placed for free.
        String editorArea = layout.getEditorArea();
        
        IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, (float) 0.20, editorArea);
        left.addView("org.eclipse.php.ui.explorer");

        IFolderLayout right = layout.createFolder("right", IPageLayout.RIGHT, (float) 0.70, editorArea);
        right.addView(PHPConsoleVariablesView.ID);
        right.addView(IPageLayout.ID_OUTLINE);        
        
        IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.80, editorArea);
        bottom.addView(HistoryView.ID);
        bottom.addView(IPageLayout.ID_PROBLEM_VIEW);

        layout.setEditorAreaVisible(true);

	}

}
